package com.df.agent.track;

import java.util.Date;

public class Span {

    private String linkId;//调用链唯一id
    private int ownId;//调用节点的id
    private int parentId;//调用节点的父节点id
    private Date enterTime; //方法进入时的事件
    private long enterNamiao; //方法进入时的纳秒事件
    private String methodName; //完整方法名
    private int times;//同级方法调用的次数
    private long fullMethodTime;//完整方法执行完所用的时间 纳秒
    private int deep = 0; //方法调用栈的深度
    //所有参数
    //返回值


    public int getOwnId() {
        return ownId;
    }

    public void setOwnId(int ownId) {
        this.ownId = ownId;
    }

    public int getParentId() {
        return parentId;
    }

    public void setParentId(int parentId) {
        this.parentId = parentId;
    }

    public int getDeep() {
        return deep;
    }

    public void setDeep(int deep) {
        this.deep = deep;
    }

    public int getTimes() {
        return times;
    }

    public void setTimes(int times) {
        this.times = times;
    }

    public long getFullMethodTime() {
        return fullMethodTime;
    }

    public void setFullMethodTime(long fullMethodTime) {
        this.fullMethodTime = fullMethodTime;
    }

    public String getMethodName() {
        return methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    public long getEnterNamiao() {
        return enterNamiao;
    }

    public void setEnterNamiao(long enterNamiao) {
        this.enterNamiao = enterNamiao;
    }

    public Date getEnterTime() {
        return enterTime;
    }

    public void setEnterTime(Date enterTime) {
        this.enterTime = enterTime;
    }

    public Span(String linkId) {
        this.linkId = linkId;
        this.enterTime = new Date();
        this.enterNamiao = System.nanoTime();
    }

    public String getLinkId(){
        return linkId;
    }

    public void setLinkId(String linkId) {
        this.linkId = linkId;
    }
}
